home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / Hash_EnumFirst.man < prev    next >
Encoding:
Text File  |  1989-03-21  |  2.7 KB  |  135 lines

  1.  
  2.  
  3.  
  4. Hash_EnumFirst        C Library Procedures         Hash_EnumFirst
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      Hash_EnumFirst, Hash_EnumNext - step through all the entries
  12.      in a hash table
  13.  
  14. SSYYNNOOPPSSIISS
  15.      ##iinncclluuddee <<hhaasshh..hh>>
  16.  
  17.      Hash_Entry *
  18.      HHaasshh__EEnnuummFFiirrsstt(_t_a_b_l_e_P_t_r, _s_e_a_r_c_h_P_t_r)
  19.  
  20.      Hash_Entry *
  21.      HHaasshh__EEnnuummNNeexxtt(_s_e_a_r_c_h_P_t_r)
  22.  
  23. AARRGGUUMMEENNTTSS
  24.      Hash_Table    *_t_a_b_l_e_P_t_r    (in)      Hash    table     whose
  25.                                           entries   are   to   be
  26.                                           enumerated.
  27.  
  28.      Hash_Search   *_s_e_a_r_c_h_P_t_r   (in)      Structure   in    which
  29.                                           information    can   be
  30.                                           stored about the  state
  31.                                           of  the  search between
  32.                                           calls to HHaasshh__EEnnuummFFiirrsstt
  33.                                           and/or HHaasshh__EEnnuummNNeexxtt.
  34.  
  35. _________________________________________________________________
  36.  
  37.  
  38. DDEESSCCRRIIPPTTIIOONN
  39.      HHaasshh__EEnnuummFFiirrsstt and HHaasshh__EEnnuummNNeexxtt permit each of the  entries
  40.      in  a  hash  table  to be examined in order.  HHaasshh__EEnnuummFFiirrsstt
  41.      returns the first entry in the given hash table and sets  up
  42.      the  Hash_Search  structure  at *_s_e_a_r_c_h_P_t_r;  if the table is
  43.      empty it returns NULL.  HHaasshh__EEnnuummNNeexxtt returns the next entry
  44.      in the table using the information stored in *_s_e_a_r_c_h_P_t_r, and
  45.      updates the contents of *_s_e_a_r_c_h_P_t_r;  when the  entire  table
  46.      has  been scanned, it returns NULL.  Entries are returned in
  47.      order of their position in the table's buckets,  which  does
  48.      not usually make any sense to the caller.
  49.  
  50.      A typical usage of these procedures is:
  51.  
  52.           Hash_Search search;
  53.           Hash_Entry *entryPtr;
  54.           Hash_Table table;
  55.  
  56.            ...
  57.  
  58.           for (entryPtr = Hash_EnumFirst(&table, &search);
  59.                entryPtr != NULL; entryPtr = Hash_EnumNext(&search)) {
  60.               ...
  61.           }
  62.  
  63.  
  64.  
  65. Sprite v.1.0        Printed:  March 21, 1989                    1
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. Hash_EnumFirst        C Library Procedures         Hash_EnumFirst
  73.  
  74.  
  75.  
  76. KKEEYYWWOORRDDSS
  77.      enumerate, hash table
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. Sprite v.1.0        Printed:  March 21, 1989                    2
  132.  
  133.  
  134.  
  135.